                    Updating the M5249C3 dBUG ROM Monitor

This document includes instructions on how to install an updated version
of dBUG ROM monitor on your ColdFire evaluation board.  There are several
methods by which this may be done, three of which are described below.

If your current dBUG monitor is "Build 1 on Mar 29 2002", you can use only
use Method II,III or IV to update your dBUG ROM Monitor. The dBUG "Updbug" 
command is not functioning properly in this version. 

If you have a later version of the dBUG monitor and it is functioning 
properly, you may use Method I,II,III, or IV

If your dBUG monitor is no longer functioning properly and you have access
to a source-level debugger (SDS SingleStep, EST visionClick, etc.) you 
should use Method II or IV to update your debugger.

If you have access to a Flash programmer (such as P&E's PROGCFW ColdFire 
Programmer, SDS SingleStep, EST visionClick, etc.) you can use Method IV 
to udate your debugger.

Files in this Archive:

*.dwn -- S-Record Format
*.s19 -- S-Record Format
*.elf -- ELF Format

     Name            Downloads To  Executes From    Method of Use

m5249c3_flash.s19    0xFFE00000    0xFFE00000      BDM Programmer
m5249c3_updbug.s19   0x00020000    0xFFE00000      updbug command
m5249c3_upuser.s19   0x00020000    0xFFF00000      upuser command      
m5249c3_ram.s19      0x00000000    0x00000000      executes in RAM
m5249c3_flash.elf    0xFFE00000    0xFFE00000      BDM Programmer
m5249c3_updbug.elf   0x00020000    0xFFE00000      updbug command
m5249c3_upuser.elf   0x00020000    0xFFF00000      upuser command
m5249c3_ram.elf      0x00040000    0x00040000      executes in RAM


Method I: Update via serial download 

  Files needed:
  m5249c3_updbug.s19

  NOTE: If you have the dBUG version "Build 1 on Mar 29 2002", please 
	use Method II, III, or IV.

  Connect the port marked 'terminal' on the M5249C3 board to a serial
  port and open a terminal window such as Hyperterminal (Win9x) or tip
  (UNIX) and establish a connection. Default settings are:

        Baud:       19200
        Data Bits:  8
        Parity:     None
        Stop Bits:  1

  NOTE:  If you have configured your M5249C3 board for network downloads,
         then you can download the dBUG Monitor files (m5249c3_updbug.s19)
		 via the Ethernet which will save a 
         considerable amount of time.

  INSTALLING THE DBUG MONITOR TO SYSTEM FLASH (updbug)

    1) Reset the board.	
    2) Access current dBUG Monitor in a terminal window.
    3) From the command line, issue the serial download command, "dl"
    4) Escape to the local host and send the file 'm5249c3_updbug.s19'
         Hyperterminal - from Transfer menu choose "Send Text File"
         Tip - type "~>" then the file to be sent (~> m5249c3_updbug.s19)
 
    The download may take several minutes.

    The new ROM monitor code should now be in DRAM (the vector table
    starting at 0x20000 and instructions starting at 0x20400).  

    To save the code to System Flash space do the following:
	
    5) Type "updbug", then "UPDATE" (all caps) when prompted.
    6) The new ROM monitor will then reset, running out of System Flash.


METHOD II:  Update via source-level debugger

  Files needed:
  m5249c3_ram.elf
  m5249c3_updbug.elf

  To get the new version of the ROM Monitor into your System Flash, do
  the following:

  Connect the BDM port of the M5249C3 board to a parallel port via 
  a ColdFire BDM cable.  Also, connect the port marked 'terminal' on the 
  M5249C3 board to a serial port via a serial cable and open a terminal
  window such as Hyperterminal (Win95) or tip (UNIX) and establish a
  connection.

  Using a source-level debugger:

  1) Download m5249c3_ram.elf using a source-level debugger
  2) Download m5249c3_updbug.elf using a source-level debugger
  3) Point the PC to 0x00040400 and begin executing (go)
 
  Using the terminal window:

  4) At terminal, the ROM monitor should be running.
  5) Type "updbug", then "UPDATE" (all caps) when prompted.
  6) The ROM Monitor will then reset, running out of Flash.

Method III: Update via serial download 

  Files needed:
  m5249c3_ram.s19
  m5249c3_updbug.s19

  This method is a combination of Method I and II and allows the user to
  update the dBUG Firmware "Build 1 on Mar 29 2002" to a newer version 
  without using a FLASH programer or other software tools.
	
  Connect the port marked 'terminal' on the M5249C3 board to a serial
  port and open a terminal window such as Hyperterminal (Win9x) or tip
  (UNIX) and establish a connection. Default settings are:

        Baud:       19200
        Data Bits:  8
        Parity:     None
        Stop Bits:  1

  NOTE:  If you have configured your M5249C3 board for network downloads,
         then you can download the dBUG Monitor files (m5249c3_updbug.s19)
		 via the Ethernet which will save a 
         considerable amount of time.

  INSTALLING THE DBUG MONITOR TO SYSTEM FLASH (updbug)

    1) Reset the board.	
    2) Access current dBUG Monitor in a terminal window.
    3) From the command line, typr the command "rm a7 0x00800000". This 
	fixes a bug in this version(build 1) of the dBUG firmware.
    4) From the command line, issue the serial download command, "dl"
    5) Escape to the local host and send the file 'm5249c3_ram.s19'
         Hyperterminal - from Transfer menu choose "Send Text File"
         Tip - type "~>" then the file to be sent (~> m5249c3_ram.s19)
 
    The download may take several minutes.

    A version of the ROM monitor should now be in DRAM (the vector table
    starting at 0x40000 and instructions starting at 0x40400). This is 
    what we are going to use to program the flash with.  

    5) Escape to the local host again and send the file 'm5249c3_updbug.s19'
         Hyperterminal - from Transfer menu choose "Send Text File"
         Tip - type "~>" then the file to be sent (~> m5249c3_updbug.s19)
 
    The download may take several minutes.

    The new ROM monitor code should now be in DRAM (the vector table
    starting at 0x20000 and instructions starting at 0x20400).  

    To save the code to System Flash space do the following:

    6) Start the m5249c3_ram.s19 version of dBUG by typing "go 40400" at
       the dBug prompt. The dBUG reset banner should now appear. 
    7) Type "updbug", then "UPDATE" (all caps) when prompted.
    8) The new ROM monitor will then reset, running out of System Flash.


METHOD IV:  Update via a Flash programmer

  Files needed:
  m5249c3_flash.s19

  Use a Flash programmer to download this s-record to the Flash
  (AM29PL160DB - 1024 x 16 x 1 device) of your M5249C3 board.  
  The base address of the Flash is 0xFFE00000.
